package de.gwtprime.shared;

import java.util.Date;

public class SharedHelper {

	public static final String emailValidationRegex = "^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$";

	@SuppressWarnings("deprecation")
	public static Date setTimeToZero(Date date){
		
		// Used deprecated methods because calendar is not supported by gwt
		Date newDate = new Date(date.getTime());
		newDate.setSeconds(0);
		newDate.setHours(0);
		newDate.setMinutes(0);
		
		return newDate;
	}
	
	
}
